<html>
<head><meta charset="utf-8"><title>c-unwind PR help · project-ffi-unwind · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/index.html">project-ffi-unwind</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html">c-unwind PR help</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227854464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/227854464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#227854464">(Feb 25 2021 at 23:03)</a>:</h4>
<p>Gah. Another rollup failure. Could someone a bit more familiar with Rust's CI help me out here? The implementation PR has failed twice now in rollup, due to <code>arm-android</code>. I've used both <code>// ignore-arm</code> and <code>// ignore-android</code> but neither of these seem to have actually applied to <code>arm-android</code>.</p>
<p>There's not a way to test this from the PR itself AFAICT, so I don't have an easy way to see if it'll work until Bors returns an error. For reference, the PR lives here: <a href="https://github.com/rust-lang/rust/pull/76570">https://github.com/rust-lang/rust/pull/76570</a></p>



<a name="227855637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/227855637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#227855637">(Feb 25 2021 at 23:13)</a>:</h4>
<p>Sorry, I have literally no <code>rustc</code> development experience! (I've moved your question to a new topic since it's not really weekly-meeting related.)</p>



<a name="227956520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/227956520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#227956520">(Feb 26 2021 at 16:55)</a>:</h4>
<p>There is a way to test this from the PR, but it's a bit subtle. You can modify the CI configuration in <code>.github</code> so that it runs additional targets for <code>pr</code> runs.</p>



<a name="227956539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/227956539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#227956539">(Feb 26 2021 at 16:55)</a>:</h4>
<p>(Make sure to revert that before r+ though)</p>



<a name="227960944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/227960944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#227960944">(Feb 26 2021 at 17:26)</a>:</h4>
<p>Oh that's handy! Thank you <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="228019881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228019881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228019881">(Feb 27 2021 at 00:58)</a>:</h4>
<p>Update: That was super helpful, I was able to confirm the failing target passed in my PR. Thank you again so much!</p>



<a name="228455279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228455279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228455279">(Mar 02 2021 at 17:56)</a>:</h4>
<p>Hello again. It seems the <code>msvc</code> CI jobs are the last remaining problem with the FFI-unwind implementation.</p>
<p>I've plugged away at this for a bit, but am feeling a bit stuck. I know very, _very_ little about Windows, and am honestly quite unsure of how to proceed with fixing this. While one option would be to ignore those targets outright, that doesn't feel like the right way forward.</p>
<p>Could someone possibly take a look at what could be the trouble here? It boils down to a linking error, because the compiler is attempting to link the foreign functions from <code>add.lib</code> rather than <code>libadd.a</code>.</p>



<a name="228455425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228455425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228455425">(Mar 02 2021 at 17:57)</a>:</h4>
<p>For context, I tried fixing this by following the example of <code>src/test/run-make-fulldeps/archive-duplicate-names/foo.rs</code>, but this didn't seem to help much. I'm a bit unfamiliar with the <code>tools.mk</code> system, so any assistance here would be greatly appreciated. Thank you so much <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="228462748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228462748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228462748">(Mar 02 2021 at 18:41)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@rylev</span> do you have any suggestions for who might be able to help <span class="user-mention" data-user-id="327458">@katelyn martin</span> here? <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="228463194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228463194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228463194">(Mar 02 2021 at 18:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="327458">katelyn martin</span> <a href="#narrow/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help/near/228455279">said</a>:</p>
<blockquote>
<p>Could someone possibly take a look at what could be the trouble here? It boils down to a linking error, because the compiler is attempting to link the foreign functions from <code>add.lib</code> rather than <code>libadd.a</code>.</p>
</blockquote>
<p>Conventionally the static libraries on Windows are named that way (<code>add.lib</code>), so when you say <code>#[link(name = "add", kind = "static")]</code>, rustc will look for <code>add.lib</code> when target is Windows.</p>



<a name="228463344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228463344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228463344">(Mar 02 2021 at 18:45)</a>:</h4>
<p>If I were you, I'd just hack the makefile to produce both <code>add.lib</code> and <code>libadd.a</code> for all platforms (initially by just copying the <code>libadd.a</code> to <code>add.lib</code> in the same makefile?)</p>



<a name="228464021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228464021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228464021">(Mar 02 2021 at 18:49)</a>:</h4>
<p>(Another question is whether <code>$(AR)</code> can produce the <code>coff</code> libraries (that's what I believe the <code>.lib</code> files are expected to be formatted as))</p>



<a name="228464670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228464670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228464670">(Mar 02 2021 at 18:52)</a>:</h4>
<p>I think what <span class="user-mention" data-user-id="123586">@nagisa</span> has suggested is the right way to go, but I can get someone more specialized in Windows to help, if that would be helpful <span class="user-mention" data-user-id="327458">@katelyn martin</span></p>



<a name="228514852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/c-unwind%20PR%20help/near/228514852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> katelyn martin <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/c-unwind.20PR.20help.html#228514852">(Mar 03 2021 at 00:49)</a>:</h4>
<p><span aria-label="pray" class="emoji emoji-1f64f" role="img" title="pray">:pray:</span> Thank you two so much. This helped tremendously.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>